package com.net.service.pack;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.net.dao.PackDAO;
import com.net.model.Pack;
import com.net.model.Page;

public class PackageServiceImpl implements PackageService{
	private PackDAO packDAO;
	
	@Autowired
	public void setPackDAO(PackDAO packDAO) {
		this.packDAO = packDAO;
	}
	
	
	@Override
	public List<Pack> listPagePackage(Page page) {
		List<Pack> packages = packDAO.listPageByParam(page);
		return packages;
	}


	/* (non-Javadoc)
	 * @see com.net.service.pack.PackageService#add(com.net.model.Pack)
	 */
	@Override
	public void add(Pack pack) {
		// TODO Auto-generated method stub
		packDAO.add(pack);
	}


	/* (non-Javadoc)
	 * @see com.net.service.pack.PackageService#getPacketByIp(java.lang.String)
	 */
	@Override
	public List<Pack> getPacketByIp(String ip) {
		// TODO Auto-generated method stub
		 List<Pack> packs=packDAO.getPacketByIp(ip);
		 return packs;
	}


	/* (non-Javadoc)
	 * @see com.net.service.pack.PackageService#getIp()
	 */
	@Override
	public List<String> getIp() {
		List<String> ips=packDAO.getIp();
		return ips;
	}
	

}
